#ifndef TABS_H
#define TABS_H

#include <QtGui>

class QWebView;
class QLineEdit;
class QComboBox;
class QPushButton;
class QNetworkRequest;
class QNetworkReply;

class Browser : public QMainWindow
{
    Q_OBJECT

public:
    Browser(const QUrl& url);
protected slots:
    void adjustLocation();
    void changeLocation();
    void goHome();
    void adjustTitle();
    void setProgress(int p);
    void finishLoading(bool);

    void viewSource();
    void slotSourceDownloaded();

    void downloadRequested(const QNetworkRequest &request);
    void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
    void downloadIssueFinished();
    void downloadReadyRead();
    void cancelDownload();

    void highlightAllLinks();
    void rotateImages(bool invert);
    void removeGifImages();
    void removeInlineFrames();
    void removeObjectElements();
    void removeEmbeddedElements();

private:
    QList<QWebView> *views;
    QTabWidget *tabs;
    QString jQuery;
    QWebView *view;
    QPushButton *home;
    QComboBox *locationCombo;
    QAction *rotateAction;
    QProgressDialog *progressDialog;
    QFile *dowFile;
    QNetworkReply *reply;
    bool downloadRequestAborted;
    int progress;
};

#endif // TABS_H
